|
uniqueid2 2.2.0
|
API for configuring and manipulating UNIQUE ID 2 Click driver. More...
Topics | |
| UNIQUE ID 2 Registers List | |
| List of registers of UNIQUE ID 2 Click driver. | |
| UNIQUE ID 2 Registers Settings | |
| Settings for registers of UNIQUE ID 2 Click driver. | |
| UNIQUE ID 2 MikroBUS Map | |
| MikroBUS pin mapping of UNIQUE ID 2 Click driver. | |
Functions | |
| void | uniqueid2_cfg_setup (uniqueid2_cfg_t *cfg) |
| UNIQUE ID 2 configuration object setup function. | |
| err_t | uniqueid2_init (uniqueid2_t *ctx, uniqueid2_cfg_t *cfg) |
| UNIQUE ID 2 initialization function. | |
| err_t | uniqueid2_default_cfg (uniqueid2_t *ctx) |
| UNIQUE ID 2 default configuration function. | |
| err_t | uniqueid2_write_memory (uniqueid2_t *ctx, uint32_t address, uint8_t *data_in, uint16_t len) |
| UNIQUE ID 2 write memory function. | |
| err_t | uniqueid2_read_memory (uniqueid2_t *ctx, uint32_t address, uint8_t *data_out, uint32_t len) |
| UNIQUE ID 2 read memory function. | |
| err_t | uniqueid2_write_register (uniqueid2_t *ctx, uint8_t reg, uint8_t data_in) |
| UNIQUE ID 2 write register function. | |
| err_t | uniqueid2_read_register (uniqueid2_t *ctx, uint8_t reg, uint8_t *data_out) |
| UNIQUE ID 2 read register function. | |
| err_t | uniqueid2_read_id_page (uniqueid2_t *ctx, uint8_t offset, uint8_t *data_out, uint16_t len) |
| UNIQUE ID 2 read ID page function. | |
| err_t | uniqueid2_read_uid (uniqueid2_t *ctx, uint8_t *uid) |
| UNIQUE ID 2 read UID function. | |
| void | uniqueid2_set_wc_pin (uniqueid2_t *ctx, uint8_t state) |
| UNIQUE ID 2 set WC pin function. | |
API for configuring and manipulating UNIQUE ID 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void uniqueid2_cfg_setup | ( | uniqueid2_cfg_t * | cfg | ) |
UNIQUE ID 2 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See uniqueid2_cfg_t object definition for detailed explanation. |
| err_t uniqueid2_default_cfg | ( | uniqueid2_t * | ctx | ) |
UNIQUE ID 2 default configuration function.
This function executes a default configuration of UNIQUE ID 2 Click board.
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uniqueid2_init | ( | uniqueid2_t * | ctx, |
| uniqueid2_cfg_t * | cfg ) |
UNIQUE ID 2 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See uniqueid2_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uniqueid2_read_id_page | ( | uniqueid2_t * | ctx, |
| uint8_t | offset, | ||
| uint8_t * | data_out, | ||
| uint16_t | len ) |
UNIQUE ID 2 read ID page function.
This function reads a desired number of data bytes from the identification page starting from the selected byte offset.
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [in] | offset | : Byte offset within the identification page [0x00-0xFF]. |
| [out] | data_out | : Pointer to the buffer to store read data. |
| [in] | len | : Number of bytes to read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uniqueid2_read_memory | ( | uniqueid2_t * | ctx, |
| uint32_t | address, | ||
| uint8_t * | data_out, | ||
| uint32_t | len ) |
UNIQUE ID 2 read memory function.
This function reads a desired number of data bytes from the EEPROM memory array starting from the selected address.
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [in] | address | : Start address in memory [0x00000-0x3FFFF]. |
| [out] | data_out | : Pointer to the buffer to store read data. |
| [in] | len | : Number of bytes to read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uniqueid2_read_register | ( | uniqueid2_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
UNIQUE ID 2 read register function.
This function reads the selected configuration register (DTI, CDA, or SWP).
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [in] | reg | : Register selector. |
| [out] | data_out | : Pointer to the byte to store the register content. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uniqueid2_read_uid | ( | uniqueid2_t * | ctx, |
| uint8_t * | uid ) |
UNIQUE ID 2 read UID function.
This function reads the 16-byte unique identifier from the identification page.
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [out] | uid | : Pointer to the buffer to store the UID. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void uniqueid2_set_wc_pin | ( | uniqueid2_t * | ctx, |
| uint8_t | state ) |
UNIQUE ID 2 set WC pin function.
This function sets the logic state of the write control pin.
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [in] | state | : Write control pin logic state. |
| err_t uniqueid2_write_memory | ( | uniqueid2_t * | ctx, |
| uint32_t | address, | ||
| uint8_t * | data_in, | ||
| uint16_t | len ) |
UNIQUE ID 2 write memory function.
This function writes a desired number of data bytes to the EEPROM memory array starting from the selected address.
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [in] | address | : Start address in memory [0x00000-0x3FFFF]. |
| [in] | data_in | : Pointer to the data to be written. |
| [in] | len | : Number of bytes to write (up to one page, 256 bytes). |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t uniqueid2_write_register | ( | uniqueid2_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
UNIQUE ID 2 write register function.
This function writes a single byte to the selected configuration register (CDA or SWP).
| [in] | ctx | : Click context object. See uniqueid2_t object definition for detailed explanation. |
| [in] | reg | : Register selector. |
| [in] | data_in | : Byte to be written to the register. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.